<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table border="1">
    <caption>个人信息</caption>
    <tr>
        <td>照片:</td><td><img src="head.jpg" width="50px" alt="" id="head_img"></td>
    </tr>
    </tr>
    <tr><td>名字:</td><td id="name_td">xxx</td></tr>
    <tr><td>年龄:</td><td id="aeg_td">xxx</td></tr>
    <tr>
        <td>好友:</td>
        <td><ul id="friend_ul"></ul></td>
    </tr>
</table>
<input type="button" value="请求数据" onclick="f()">
<script>
    function f() {
        let person = {name:"苍老师",age:50,url:"a.jpg",
        friend:["克晶","传奇","成恒"]}
        head_img.src=person.url;
        name_td.innerText = person.name
        age_td.innerText= person.age
        for (let friendName of person.friend){
            let li = document.createElement("li")
            feirnd_ul.append(li)
        }
    }
</script>
</body>
</html>